package com.ruoyi.omp.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.omp.api.domain.SysJob;
import com.ruoyi.omp.api.factory.RemoteJobFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteJobService", value = ServiceNameConstants.MODULES_JOB_SERVICE, fallbackFactory =
        RemoteJobFactory.class)
public interface RemoteJobService {
    /**
     * 添加job
     * @return
     */
    @PostMapping(value = "/job/add")
    public R addJob(@RequestBody SysJob sysJob);

    //删除job
//    @DeleteMapping("/job/delete/{jobIds}")
//    public R removeJob(@PathVariable Long[] jobIds);

    //修改job
    @PutMapping("/job/edit")
    public R editJob(@RequestBody SysJob sysJob);

}
